const { ccclass, property } = cc._decorator;

@ccclass
export default class CollsionBody extends cc.Component {

    

    onCollisionEnter(other: cc.Collider, self: cc.Collider) {
        let bodyComp: any = this.node.parent.getComponent(cc.Component);
        return bodyComp.onCollisionEnter && bodyComp.onCollisionEnter(other, self);
    }

    onCollisionExit(other: cc.Collider, self: cc.Collider) {
        let bodyComp: any = this.node.parent.getComponent(cc.Component);
        return bodyComp.onCollisionExit && bodyComp.onCollisionExit(other, self);
    }

}
